<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>geometry</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Metadata Crawler</th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Module&nbsp;geometry
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="geometry-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module geometry</h1><p class="nomargin-top"><span class="codelink"><a href="geometry-pysrc.html">source&nbsp;code</a></span></p>
<h1 class="heading">Geometry and dataset helper functions</h1>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="geometry.ShapeWriter-class.html" class="summary-name">ShapeWriter</a><br />
      A class for writing geometry and fields to ESRI shapefile format
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="OpenDataset"></a><span class="summary-sig-name">OpenDataset</span>(<span class="summary-sig-arg">f</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default">0</span>)</span><br />
      Open &amp; return a gdalDataset object</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#OpenDataset">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="geometry-module.html#Rotation" class="summary-sig-name">Rotation</a>(<span class="summary-sig-arg">gt</span>)</span><br />
      Get rotation angle from a geotransform</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#Rotation">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="geometry-module.html#CellSize" class="summary-sig-name">CellSize</a>(<span class="summary-sig-arg">gt</span>)</span><br />
      Get cell size from a geotransform</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CellSize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="geometry-module.html#SceneCentre" class="summary-sig-name">SceneCentre</a>(<span class="summary-sig-arg">gt</span>,
        <span class="summary-sig-arg">cols</span>,
        <span class="summary-sig-arg">rows</span>)</span><br />
      Get scene centre from a geotransform.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#SceneCentre">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="geometry-module.html#GeoTransformToGCPs" class="summary-sig-name">GeoTransformToGCPs</a>(<span class="summary-sig-arg">gt</span>,
        <span class="summary-sig-arg">cols</span>,
        <span class="summary-sig-arg">rows</span>)</span><br />
      Form a gcp list from a geotransform using the 4 corners.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#GeoTransformToGCPs">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="GeomFromExtent"></a><span class="summary-sig-name">GeomFromExtent</span>(<span class="summary-sig-arg">ext</span>,
        <span class="summary-sig-arg">srs</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">srs_wkt</span>=<span class="summary-sig-default">None</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#GeomFromExtent">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="geometry-module.html#ReprojectGeom" class="summary-sig-name">ReprojectGeom</a>(<span class="summary-sig-arg">geom</span>,
        <span class="summary-sig-arg">src_srs</span>,
        <span class="summary-sig-arg">tgt_srs</span>)</span><br />
      Reproject a geometry object.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#ReprojectGeom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CreateVRTCopy"></a><span class="summary-sig-name">CreateVRTCopy</span>(<span class="summary-sig-arg">ds</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CreateVRTCopy">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CreateMosaicedVRT"></a><span class="summary-sig-name">CreateMosaicedVRT</span>(<span class="summary-sig-arg">files</span>,
        <span class="summary-sig-arg">bands</span>,
        <span class="summary-sig-arg">srcrects</span>,
        <span class="summary-sig-arg">dstrects</span>,
        <span class="summary-sig-arg">cols</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">datatype</span>,
        <span class="summary-sig-arg">relativeToVRT</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CreateMosaicedVRT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CreateSimpleVRT"></a><span class="summary-sig-name">CreateSimpleVRT</span>(<span class="summary-sig-arg">bands</span>,
        <span class="summary-sig-arg">cols</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">datatype</span>,
        <span class="summary-sig-arg">relativeToVRT</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CreateSimpleVRT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CreateRawRasterVRT"></a><span class="summary-sig-name">CreateRawRasterVRT</span>(<span class="summary-sig-arg">bands</span>,
        <span class="summary-sig-arg">cols</span>,
        <span class="summary-sig-arg">rows</span>,
        <span class="summary-sig-arg">datatype</span>,
        <span class="summary-sig-arg">nbits</span>,
        <span class="summary-sig-arg">headeroffset</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">byteorder</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">relativeToVRT</span>=<span class="summary-sig-default">0</span>)</span><br />
      Create RawRaster VRT from one or more _single_ band files</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CreateRawRasterVRT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="CreateCustomVRT"></a><span class="summary-sig-name">CreateCustomVRT</span>(<span class="summary-sig-arg">vrtxml</span>,
        <span class="summary-sig-arg">vrtcols</span>,
        <span class="summary-sig-arg">vrtrows</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="geometry-pysrc.html#CreateCustomVRT">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="Rotation"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">Rotation</span>(<span class="sig-arg">gt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="geometry-pysrc.html#Rotation">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Get rotation angle from a geotransform</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>gt</code></strong> - geotransform</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="CellSize"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">CellSize</span>(<span class="sig-arg">gt</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="geometry-pysrc.html#CellSize">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Get cell size from a geotransform</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>gt</code></strong> - geotransform</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="SceneCentre"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">SceneCentre</span>(<span class="sig-arg">gt</span>,
        <span class="sig-arg">cols</span>,
        <span class="sig-arg">rows</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="geometry-pysrc.html#SceneCentre">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Get scene centre from a geotransform.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>gt</code></strong> - geotransform</li>
        <li><strong class="pname"><code>cols</code></strong> - number of columns in the dataset</li>
        <li><strong class="pname"><code>rows</code></strong> - number of rows in the dataset</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="GeoTransformToGCPs"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">GeoTransformToGCPs</span>(<span class="sig-arg">gt</span>,
        <span class="sig-arg">cols</span>,
        <span class="sig-arg">rows</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="geometry-pysrc.html#GeoTransformToGCPs">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Form a gcp list from a geotransform using the 4 corners.</p>
  <p>This function is meant to be used to convert a geotransform to gcp's 
  so that the geocoded information can be reprojected.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>gt</code></strong> - geotransform to convert to gcps</li>
        <li><strong class="pname"><code>cols</code></strong> - number of columns in the dataset</li>
        <li><strong class="pname"><code>rows</code></strong> - number of rows in the dataset</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="ReprojectGeom"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">ReprojectGeom</span>(<span class="sig-arg">geom</span>,
        <span class="sig-arg">src_srs</span>,
        <span class="sig-arg">tgt_srs</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="geometry-pysrc.html#ReprojectGeom">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Reproject a geometry object.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>geom</code></strong> - GDAL geometry object</li>
        <li><strong class="pname"><code>src_srs</code></strong> - GDAL (OSR) SpatialReference object</li>
        <li><strong class="pname"><code>tgt_srs</code></strong> - GDAL (OSR) SpatialReference object</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            >Metadata Crawler</th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Oct 07 14:35:45 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
